<!--<?php
print <<<EOT
-->
<div class="m"></div>
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="tr4"><td>
  <input type="button" name="Submit5" value="用户一览" class="btn" onclick="window.location='$basename';"/>
  <input type="button" name="Submit5" value="创建用户" class="btn" onclick="window.location='$basename&action=add';"/>
<!--
EOT;
if($very[nbc]){
print <<<EOT
-->
  <input type="button" name="Submit5" value="同步用户" class="btn" onclick="window.location='$basename&action=init';" title="和协同办公系统同步用户数据"/>
<!--
EOT;
}print <<<EOT
--> 
  <input type="button" name="Submit5" value="重新统计用户上传" class="btn" onclick="window.location='$basename&action=total';"/> 
  </td>
</tr>
</table>
</div>
<!--
EOT;
if(!$action){
print <<<EOT
-->
<form id="form1" name="USER" method="post" action="$basename">
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="head"><td colspan="9">用户管理  （共 $count 名用户）</td></tr>
<tr class="tr2">
  <td width="2%">&nbsp;</td>
  <td width="3%">&nbsp;</td>
  <td>UID</td>
  <td>账号</td>
  <td>所属组</td>
  <td>上传数量</td>
  <td>上次登录时间</td>
  <td>登录IP</td>
  <td>管理操作</td>
</tr>
<!--
EOT;
foreach($admindb as $admin){
$delurl = EncodeUrl("$basename&action=del&uid=$admin[uid]");
print <<<EOT
-->
<tr class="tr3">
  <td>
    <input type="checkbox" name="userid[]" value="$admin[uid]" />
  </td>
  <td>
<!--
EOT;
if(empty($admin[password])){
print <<<EOT
-->
<img src="images/icon/notice.png" title="此账号尚未设置密码" align="absmiddle" />
<!--
EOT;
} else {print <<<EOT
-->  
  <img src="images/icon/user.png" align="absmiddle" />
<!--
EOT;
}print <<<EOT
-->  </td>
  <td>$admin[uid]</td>
  <td>$admin[username]</td>
  <td>$admin[group]</td>
  <td>$admin[postnum]</td>
  <td>$admin[logintime]</td>
  <td>$admin[ip]</td>
  <td><a href="$basename&action=edit&uid=$admin[uid]&page={$_GET[page]}"><img src="images/admin/edit.png" align="absmiddle" alt="编辑" /></a> <a href="$basename&action=del&uid=$admin[uid]"><img src="images/admin/delete.png" align="absmiddle" alt="删除" onclick="return confirm('您确认要删除此用户？');" /></a>  </td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="tr4"><td><select name="togroup" id="togroup">
      <option value="0">修改所属组</option>
$select
</select>
	<input type="hidden" name="action" id="action" value="muledit" />    
	<input type="hidden" name="page" value="{$_GET[page]}" />
    <input type="button" name="button2" id="button2" value="全选" class="btn" onclick="CheckAll(document.USER);" />
    <input type="submit" name="button" id="button" value="批量修改" class="btn" onclick="$('#action').val('muledit')" />
    <input type="button" name="button2" id="button2" value="批量删除" class="btn" onclick="return mulDel();"  />
    </td>
    <td>$pages</td>
</tr></table>
</div>
</form>
<script language="javascript">
function mulDel()
{
	if(!confirm("您确认要删除这些用户吗？\\n\\n删除之后用户信息不可恢复！")) return false;
	$('#action').val('muldel');
	document.USER.submit();
}
</script>
<!--
EOT;
}elseif($action=='edit'){
print <<<EOT
-->
<form action="$basename" method="post">
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="head">
  <td colspan="2">编辑用户</td>
</tr>
<!--
EOT;
if($edit[nbcid]) {print <<<EOT
-->
<tr class="tr2">
  <td colspan="2">此账号是从协同办公同步过来，故而无法在此修改其密码信息，其协同办公的账号ID为： $edit[nbcid] </td>
  </tr>
<!--
EOT;
}print <<<EOT
-->  
  </td>
  </tr>
<tr class="line">
  <td>后台权限</td>
  <td><input type="radio" name="ifadmin" value="1" $ifadmin_Y />
    拥有权限
      <input name="ifadmin" type="radio" value="0" $ifadmin_N />
     没有权限 (具备后台管理权限的用户可以登录后台进行一般管理，且可以查看前台所有目录下的{$very[contentName]})</td>
</tr>
<tr class="line">
  <td width="25%">登录账号</td>
  <td width="75%"><input name="new_username" type="text" disabled="disabled" class="input" id="new_username" value="$edit[username]" $disable />
  (账号不能修改)</td>
</tr>
<!--
EOT;
if(!$edit[nbcid]){
print <<<EOT
-->
<tr class="line">
  <td>登录密码</td>
  <td><input name="new_password" type="password" id="new_password" class="input" />
  (如果不修改清留空)</td>
</tr>
<tr class="line">
  <td>密码确认</td>
  <td><input name="new_password2" type="password" id="new_password2" class="input" /></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
<!--<tr class="line">
  <td>真实姓名</td>
  <td><input name="realname" type="text" class="input" id="realname" value="$edit[realname]" /></td>
</tr>
<tr class="line">
  <td>身份证号码</td>
  <td><input name="idcard" type="text" class="input" id="idcard" value="$edit[idcard]" size="30" /></td>
</tr>-->
<tr class="line">
  <td>联系电话</td>
  <td><input name="telephone" type="text" class="input" id="telephone" value="$edit[telephone]" /></td>
</tr>
<tr class="line">
  <td>所属组</td>
  <td><select name="groupid" id="groupid">
  $select
  </select>  </td>
</tr>
<tr class="line">
  <td>E-mail</td>
  <td><input name="new_email" type="text" class="input" id="new_email" value="$edit[email]" /></td>
</tr>
</table>
</div>
<center>
  <input name="uid" type="hidden" id="uid" value="$edit[uid]" />
  <input name="action" type="hidden" id="action" value="edit" />
  <input name="step" type="hidden" id="step" value="2">
  <input name="page" type="hidden" id="page" value="{$_GET[page]}">
  <input type="submit" name="Submit" value=" 提 交 " class="btn"> 
  <input type="reset" name="Submit2" value=" 重 置 " class="btn">
</center>
</form>
<!--
EOT;
}elseif($action=='add'){
print <<<EOT
-->
<form action="$basename" method="post">
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="head">
  <td colspan="2">创建用户</td>
</tr>
<!--
EOT;
if($very[nbc]) {print <<<EOT
-->
<tr class="tr2">
  <td colspan="2">系统已经开启了协同办公用户整合，您确认要在此创建账号么？在此创建的账号无法登录协同办公系统。 </td>
  </tr>
<!--
EOT;
}print <<<EOT
--> 
<tr class="line">
  <td>后台权限</td>
  <td><input type="radio" name="ifadmin" value="1" />
    拥有权限
      <input name="ifadmin" type="radio" value="0" checked="checked" />
     没有权限</td>
</tr>
<tr class="line">
  <td width="25%">登录账号</td>
  <td width="75%"><input name="new_username" type="text" id="new_username" class="input" />
    *</td>
</tr>
<tr class="line">
  <td>登录密码</td>
  <td><input name="new_password" type="password" id="new_password" class="input" />
    *</td>
</tr>
<tr class="line">
  <td>密码确认</td>
  <td><input name="new_password2" type="password" id="new_password2" class="input" />
    *</td>
</tr>
<tr class="line">
  <td>真实姓名</td>
  <td><input name="realname" type="text" id="realname" class="input" /></td>
</tr>
<tr class="line">
  <td>身份证号码</td>
  <td><input name="idcard" type="text" class="input" id="idcard" size="30" /></td>
</tr>
<tr class="line">
  <td>联系电话</td>
  <td><input name="telephone" type="text" id="telephone" class="input" /></td>
</tr>
<tr class="line">
  <td>所属组</td>
  <td><select name="groupid" id="groupid">
  $select
  </select>  </td>
</tr>
<tr class="line">
  <td>E-mail</td>
  <td><input name="new_email" type="text" id="new_email" class="input" /></td>
</tr>
</table>
</div>
<center>
  <input name="action" type="hidden" id="action" value="add" />
  <input name="step" type="hidden" id="step" value="2">
  <input type="submit" name="Submit" value=" 提 交 " class="btn"> 
  <input type="reset" name="Submit2" value=" 重 置 " class="btn">
</center>
</form>
<!--
EOT;
}
?>-->